package com.example.ojbackendjudgeservice.controller.inner;

import com.example.ojbackendjudgeservice.judge.JudgeService;
import com.example.ojbackendmodel.model.entity.QuestionSubmit;
import com.example.ojbackendserviceclient.service.JudgeFeignClient;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;


/*
  inner只在内部调用，不是给前端的
 */
@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {

    @Resource
    private JudgeService judgeService;

    @Override
    @PostMapping("/do")
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId){
        return judgeService.doJudge(questionSubmitId);
    }

}
